package com.ak.auth;

import com.ak.common.annotation.EnableAuthExceptionHandler;
import com.ak.common.annotation.EnableLettuceRedis;
import com.ak.common.annotation.EnableServerProtect;
import com.ak.common.entity.constant.ServerConstants;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;

import java.time.LocalDateTime;

@Slf4j
@EnableLettuceRedis
@EnableServerProtect
@SpringBootApplication
@EnableDiscoveryClient
@EnableAuthExceptionHandler
@MapperScan("com.ak.auth.mapper")
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class AKAuthApplication {

    public static void main(String[] args) {
        SpringApplication.run(AKAuthApplication.class, args);
        log.info("  _   _   _   _   _   _   _");
        log.info(" / \\ / \\ / \\ / \\ / \\ / \\ / \\");
        log.info("| s | t | a | r | t | e | d |");
        log.info(" \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/");
        log.info("{} 启动完毕，时间：{}", ServerConstants.AK_AUTH, LocalDateTime.now());
    }
}
